package edu.bu.cs673.superkids123.children.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import edu.bu.cs673.superkids123.common.model.Child;

@Entity
@Table(name="PlayTime")
public class PlayTime {

	@Id @GeneratedValue
	@Column(name="PlayTimeID")
	private int PlayTimeID;
	
	@Column(name="DatePlayed")
	private Date datePlayed;
	
	@Column(name="TimePlayed")
	private int timePlayed;
	
	@ManyToOne
	@JoinColumn(name="UserID")
	@NotFound(action=NotFoundAction.IGNORE)
	private Child child;
	
	public int getPlayTimeID() {
		return PlayTimeID;
	}

	public void setPlayTimeID(int PlayTimeID) {
		this.PlayTimeID = PlayTimeID;
	}

	public Date getDatePlayed() {
		return datePlayed;
	}

	public void setDatePlayed(Date datePlayed) {
		this.datePlayed = datePlayed;
	}
	
	public int getTimePlayed() {
		return timePlayed;
	}

	public void setTimePlayed(int timePlayed) {
		this.timePlayed = timePlayed;
	}

	public PlayTime(){
		
	}

	public void setChild(Child child) {
		this.child = child;
	}
	
	public Child getChild() {
		return child;
	}
}
